#!/bin/bash

systemctl stop nanocld
systemctl stop ncproxy
systemctl stop nproxy


# 删除 Nanocl 配置和数据
rm -rf /etc/nanocl
rm -rf /var/lib/nanocl
rm -rf /run/nanocl

# 停止并删除所有容器
crictl ps -q | xargs -r crictl stop
crictl ps -qa | xargs -r crictl rm

# 停止并删除所有 Pod
crictl pods -q | xargs -r crictl stopp
crictl pods -q | xargs -r crictl rmp

# 删除 Nginx 配置文件
rm -f /etc/nginx/nginx.conf
